package com.ruoyi.zsyh.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.common.utils.IdWorker;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.zsyh.mapper.ZsyhServiceTypeDetailMapper;
import com.ruoyi.zsyh.domain.ZsyhServiceTypeDetail;
import com.ruoyi.zsyh.service.IZsyhServiceTypeDetailService;
import com.ruoyi.common.core.text.Convert;

/**
 * 服务分类详细Service业务层处理
 * 
 * @author yuexl
 * @date 2022-02-16
 */
@Service
public class ZsyhServiceTypeDetailServiceImpl implements IZsyhServiceTypeDetailService 
{
    @Autowired
    private ZsyhServiceTypeDetailMapper zsyhServiceTypeDetailMapper;

    /**
     * 查询服务分类详细
     * 
     * @param id 服务分类详细ID
     * @return 服务分类详细
     */
    @Override
    public ZsyhServiceTypeDetail selectZsyhServiceTypeDetailById(String id)
    {
        return zsyhServiceTypeDetailMapper.selectZsyhServiceTypeDetailById(id);
    }

    /**
     * 查询服务分类详细列表
     * 
     * @param zsyhServiceTypeDetail 服务分类详细
     * @return 服务分类详细
     */
    @Override
    public List<ZsyhServiceTypeDetail> selectZsyhServiceTypeDetailList(ZsyhServiceTypeDetail zsyhServiceTypeDetail)
    {
        return zsyhServiceTypeDetailMapper.selectZsyhServiceTypeDetailList(zsyhServiceTypeDetail);
    }

    /**
     * 新增服务分类详细
     * 
     * @param zsyhServiceTypeDetail 服务分类详细
     * @return 结果
     */
    @Override
    public int insertZsyhServiceTypeDetail(ZsyhServiceTypeDetail zsyhServiceTypeDetail)
    {
        zsyhServiceTypeDetail.setId(IdWorker.getId());
        zsyhServiceTypeDetail.setCreateTime(DateUtils.getNowDate());
        return zsyhServiceTypeDetailMapper.insertZsyhServiceTypeDetail(zsyhServiceTypeDetail);
    }

    /**
     * 修改服务分类详细
     * 
     * @param zsyhServiceTypeDetail 服务分类详细
     * @return 结果
     */
    @Override
    public int updateZsyhServiceTypeDetail(ZsyhServiceTypeDetail zsyhServiceTypeDetail)
    {
        zsyhServiceTypeDetail.setUpdateTime(DateUtils.getNowDate());
        return zsyhServiceTypeDetailMapper.updateZsyhServiceTypeDetail(zsyhServiceTypeDetail);
    }

    /**
     * 删除服务分类详细对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteZsyhServiceTypeDetailByIds(String ids)
    {
        return zsyhServiceTypeDetailMapper.deleteZsyhServiceTypeDetailByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除服务分类详细信息
     * 
     * @param id 服务分类详细ID
     * @return 结果
     */
    @Override
    public int deleteZsyhServiceTypeDetailById(String id)
    {
        return zsyhServiceTypeDetailMapper.deleteZsyhServiceTypeDetailById(id);
    }

    @Override
    public List<ZsyhServiceTypeDetail> selectZsyhServiceTypeDetailSecondList(ZsyhServiceTypeDetail zsyhServiceTypeDetail) {
        return zsyhServiceTypeDetailMapper.selectZsyhServiceTypeDetailSecondList(zsyhServiceTypeDetail);
    }

    @Override
    public List<ZsyhServiceTypeDetail> selectZsyhServiceTypeDetailThirdList(ZsyhServiceTypeDetail zsyhServiceTypeDetail) {
        return zsyhServiceTypeDetailMapper.selectZsyhServiceTypeDetailThirdList(zsyhServiceTypeDetail);
    }
}
